<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<?php if($type == 'logout') : ?>
<form action="index.php" method="post" name="login" id="form-login">
<?php if ($params->get('greeting')) : ?>
	<div>
	<?php if ($params->get('name')) : {
		echo JText::sprintf( 'HINAME', $user->get('name') );
	} else : {
		echo '<a href="index.php?page=account.index&option=com_virtuemart&Itemid=6">'.JText::sprintf( 'HINAME', $user->get('username') ).'</a>';
		
	} endif; ?>
	</div>
<?php endif; ?>
	<div align="center">
		<input type="submit" name="Submit" class="button" value="<?php echo JText::_( 'BUTTON_LOGOUT'); ?>" />
	</div>

	<input type="hidden" name="option" value="com_user" />
	<input type="hidden" name="task" value="logout" />
	<input type="hidden" name="return" value="<?php echo $return; ?>" />
</form>
<?php else : ?>
<?php if(JPluginHelper::isEnabled('authentication', 'openid')) :
		$lang->load( 'plg_authentication_openid', JPATH_ADMINISTRATOR );
		$langScript = 	'var JLanguage = {};'.
						' JLanguage.WHAT_IS_OPENID = \''.JText::_( 'WHAT_IS_OPENID' ).'\';'.
						' JLanguage.LOGIN_WITH_OPENID = \''.JText::_( 'LOGIN_WITH_OPENID' ).'\';'.
						' JLanguage.NORMAL_LOGIN = \''.JText::_( 'NORMAL_LOGIN' ).'\';'.
						' var modlogin = 1;';
		$document = &JFactory::getDocument();
		$document->addScriptDeclaration( $langScript );
		JHTML::_('script', 'openid.js');
endif; ?>
<form action="<?php echo JRoute::_( 'index.php', true, $params->get('usesecure')); ?>" method="post" name="login" id="form-login" >
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	  <tr>
		<td style="padding-left:5px;"><input type="text"  name="username" value="<?php echo JText::_('Username') ?>" class="inputbox log" size="14"  onblur="if(this.value=='') this.value='<?php echo JText::_('Username') ?>';" onfocus="if(this.value=='<?php echo JText::_('Username') ?>') this.value='';" /></td>
		<td><input type="password"  name="passwd" class="inputbox log" value="<?php echo JText::_('Password') ?>" size="15" onblur="if(this.value=='') this.value='<?php echo JText::_('Password') ?>';" onfocus="if(this.value=='<?php echo JText::_('Password') ?>') this.value='';" /></td>
		<td><input type="submit" name="Submit" class="button_log" value="<?php //echo JText::_('LOGIN') ?>" /></td>
	  </tr>
	</table>
	<?php echo $params->get('posttext'); ?>

	<input type="hidden" name="option" value="com_user" />
	<input type="hidden" name="task" value="login" />
	<input type="hidden" name="return" value="<?php echo $return; ?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
<?php endif; ?>